import gzip
file = open('pandas-0.17.0.tar', 'wb')
f = gzip.open('pandas-0.17.0.tar.gz', 'rb')
file_content = f.read()
file.write(file_content)
f.close()
file.close()
